//------------------------------------------------------------------------------
//
//  Hemisson Types
//
//  Written Dec-2007 by Trevor Taylor, Software Technology, Australia
//
//------------------------------------------------------------------------------

using Microsoft.Dss.Core.Attributes;
using System;
using System.Collections.Generic;

// Added after service creation. There are some surprising omissions!
using Microsoft.Ccr.Core;
using System.ComponentModel;
using Microsoft.Dss.ServiceModel.Dssp;

using W3C.Soap;
using Microsoft.Dss.Core.DsspHttp;


namespace ProMRDS.Robotics.Hemisson
{
    
    
    /// <summary>
    /// Hemisson Contract
    /// </summary>
    public sealed class Contract
    {
        
        /// The Unique Contract Identifier for the Hemisson service
        public const String Identifier = "http://www.promrds.com/contracts/2008/01/hemisson.html";
    }


    [DisplayName("ReadIR")]
    [Description("Set reading period for the Hemisson's infrared sensors")]
    public class ReadIR : Update<SensorPollRequest, PortSet<DefaultUpdateResponseType, Fault>>
    {
        /*
        public ReadIR()
        {
        }

        public ReadIR(int period)
        {
            this.Body.Interval = period;
        }
         */
    }

    [Description("Requests that sensors be polled")]
    [DataContract]
    public class SensorPollRequest
    {
    }

    #region Device IDs

    // These are easy ways to reference the devices in code
    public enum Pins
    {
        IrBumper = 6,
        LED1 = 5,
        LED2 = 6,
        Buzzer = 7
    }

    // Hardware IDs
    public enum HwIds
    {
        IRFront = 1,
        IRFrontRight,
        IRFrontLeft,
        IRRight,
        IRLeft,
        IRRear,
        IRGroundRight,
        IRGroundLeft,
        LED1 = 11,
        LED2,
        LED3,
        LED4,
        Buzzer = 21,
        Switch1 = 31,
        Switch2,
        Switch3,
        Switch4
    }

    #endregion

}
